//
//  SLXinFeedTableViewCell.m
//  SoccerLottery
//
//  Created by chuanshuangzhang chuan shuang on 16/5/24.
//  Copyright © 2016年 chuanshuangzhang. All rights reserved.
//

#import "SLXinFeedTableViewCell.h"

@implementation SLXinFeedTableViewCell


- (void)setResult:(NSString *)result
{
    if([result isEqualToString:@"<null>"])
    {
        result = @"";
    }
       _rsultLabel.text = result;
    if([result containsSubString:@"赢"]){
        _rsultLabel.textColor = [UIColor redColor];
    }else if([result containsSubString:@"输"]){
        _rsultLabel.textColor = [UIColor grayColor];
    }else if([result isEqualToString:@"走"]){
        _rsultLabel.textColor = [UIColor greenColor];
    }
}

- (void)setIsPurchased:(BOOL)isPurchased
{
   if(isPurchased)
   {
       self.lineView.alpha = 0.0;
       self.priceLabel.textColor = RGB(0x99, 0x99, 0x99, 1.0);
       self.priceLabel.text = @"已经购买";
   }else if(self.scoreLabel.text.length <=0){
       self.lineView.alpha = 0.0;
       self.priceLabel.textColor = [UIColor redColor];
   }else {
       self.lineView.alpha = 1.0;
       self.priceLabel.textColor = [UIColor redColor];
   }
}
@end
